﻿using Lucene.Net.Analysis;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FortuneArterial.Site.BusinessLogicLayer.LunceneSearch.Analysis
{
    public class PanGuAnalyzer
        : Analyzer
    {
        private bool _OriginalResult;

        public PanGuAnalyzer()
        {
        }

        public PanGuAnalyzer(bool originalResult)
        {
            this._OriginalResult = originalResult;
        }

        public override Lucene.Net.Analysis.TokenStream TokenStream(string fieldName, System.IO.TextReader reader)
        {
            return new LowerCaseFilter(new PanGuTokenizer(reader, this._OriginalResult));
        }
    }
}
